<?php

namespace lite\controllers;

use admin\models\store\AR\StoreAR;
use admin\models\store\Store;
use Yii;
use weixin\libs\CommonController;

class StoreController extends CommonController
{
    public function actionList(){
        $filters = yii::$app->request->post('filters');
        $orders = yii::$app->request->post('orders');
        $offset = yii::$app->request->post('offset');
        $limit = yii::$app->request->post('limit');


        $store = new Store();
        $result = $store->storeList($filters, $orders, $offset, $limit);
        if($result) {
            return $this->ajaxResponseSuccess($result);
        } else {
            return $this->ajaxResponseError($store->getErrMsg(), -1);
        }
    }
}
